import type { App } from "vue";
// 按需引入需要全局引入一些组件，如ElScrollbar，不然一些样式有问题
import {
  ElLoading,
  ElScrollbar,
  ElInput,
  ElMessage,
  ElMessageBox,
  ElOverlay
} from "element-plus";

const plugins = [ElLoading, ElMessage, ElMessageBox];
const components = [ElScrollbar, ElInput,ElOverlay];
export const setupElementPlus = (app: App<Element>) => {
  console.log("初始化");
  plugins.forEach((plugin) => {
    app.use(plugin);
  });

  components.forEach((component) => {
    app.component(component.name, component);
  });
};
